package cn.itsource.ymcc.producer;

import cn.itsource.ymcc.constant.CourseConstants;
import cn.itsource.ymcc.constant.OrderConstants;
import com.alibaba.fastjson.JSON;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderProducerImpl implements IOrderProducer {
    @Autowired
    private RocketMQTemplate rocketMQTemplate;

    @Override
    public void sendSYSTEM(String message) {
        rocketMQTemplate.sendOneWay(OrderConstants.TOPIC_ORDER_SYSTEM_PUSH+":"+OrderConstants.TAGS_ORDER_SYSTEM_PUSH,
                MessageBuilder.withPayload(message).build());
    }

}
